<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserTeamTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_team', function (Blueprint $table) {
            $table->increments('id');
            $table->string("team_code",32)->comment("团队code");
            $table->integer("user_id")->comment("用户ID");
            $table->string("mobile",20)->nullable()->comment("手机号");
            $table->string("role")->default("")->comment("团长leader团员member");
            $table->integer("is_recharge")->default(0)->comment("是否充值(1充值,0未充值)");
            $table->integer("status")->default(0)->comment("状态");
            $table->string("remark",200)->nullable()->comment("备注");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_team');
    }
}
